<?php

namespace app\common\validate;

use think\Validate;

class Red extends Validate
{
	protected $rule = [
		"title" => "require",
		"money" => "require|gt:0",
		"start_collection_time" => "require",
		"end_collection_time" => "require",
		"validity_time" => "require",
		"limit_amount" => "require|gt:0",

		"agent_id" => "require",
	];

	protected $message = [
		"title.require" => "请输入红包名称数",

		"money.require" => "请输入抵用金额",
		"money.gt" => "抵用金额数必须大于0",

		"start_collection_time.require" => "请输入开始领取时间",

		"end_collection_time.require" => "请输入领取结束时间",

		"validity_time.require" => "请输入有效期时间",

		"limit_amount.require" => "请输入满金额",
		"money.gt" => "满金额数必须大于0",

		"agent_id.require" => "请选择代理商",
	];
	protected $scene = [
		'add' => ['title','money','start_collection_time','end_collection_time','validity_time','limit_amount','agent_id'],
		'edit' => ['title','money','start_collection_time','end_collection_time','validity_time','limit_amount','agent_id'],
	];
}
